<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('think', function () {
    return 'hello,ThinkPHP5!';
});

Route::get('hello/:name', 'index/hello');

Route::group('',function (){
    /**
     * 登录模块
     */
    Route::post('exitLogin', 'Login/exitLogin');

    /**
     * 管理员模块
     */
    Route::post('addProject', 'Admin/addProject');
    Route::delete('proDelete', 'Admin/proDelete');
    Route::get('proCheck', 'Admin/proCheck');
    Route::post('proEdit', 'Admin/proEdit');

    /**
     * 详情页模块
     */
    Route::get('detailPage', 'Detail/detailPage');
    Route::get('alreadyThrow', 'Detail/alreadyThrow');
    Route::post('userThrow', 'Detail/userThrow');

    /**
     *用户模块
     */
    Route::get('startProject', 'UserController/startProject');
    Route::get('takePartIn', 'UserController/takePartIn');

})->middleware('Check')->allowCrossDomain();

Route::group('',function (){
    /**
     * 登录注册
     */
    Route::post('register', 'Login/register');
    Route::post('login', 'Login/login');

})->allowCrossDomain();

return [

];
